package com.ming.luckyDemo.pojo.TDO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BetDTO {

    private int numbers;
    /**
     * 总和：大、小、单、双、
     * 单个：大、小、单、双、
     */
    private double zBig;
    private double zSmall;
    private double zOdd;
    private double zEven;

    private double big1;
    private double small1;
    private double odd1;
    private double even1;

    private double big2;
    private double small2;
    private double odd2;
    private double even2;

    private double big3;
    private double small3;
    private double odd3;
    private double even3;

    /**
     * 正数为大
     * @return
     */
    public double getZSize(){
        BigDecimal b1 = new BigDecimal(Double.toString(zBig));
        BigDecimal b2 = new BigDecimal(Double.toString(zSmall));
        return b1.subtract(b2).doubleValue();
    }

    /**
     * 正数为单
     * @return
     */
    public double getZParity(){
        BigDecimal b1 = new BigDecimal(Double.toString(zOdd));
        BigDecimal b2 = new BigDecimal(Double.toString(zEven));
        return b1.subtract(b2).doubleValue();
    }

    public double getSize1(){
        BigDecimal b1 = new BigDecimal(Double.toString(big1));
        BigDecimal b2 = new BigDecimal(Double.toString(small1));
        return b1.subtract(b2).doubleValue();
    }
    public double getParity1(){
        BigDecimal b1 = new BigDecimal(Double.toString(odd1));
        BigDecimal b2 = new BigDecimal(Double.toString(even1));
        return b1.subtract(b2).doubleValue();
    }

    public double getSize2(){
        BigDecimal b1 = new BigDecimal(Double.toString(big2));
        BigDecimal b2 = new BigDecimal(Double.toString(small2));
        return b1.subtract(b2).doubleValue();
    }
    public double getParity2(){
        BigDecimal b1 = new BigDecimal(Double.toString(odd2));
        BigDecimal b2 = new BigDecimal(Double.toString(even2));
        return b1.subtract(b2).doubleValue();
    }

    public double getSize3(){
        BigDecimal b1 = new BigDecimal(Double.toString(big3));
        BigDecimal b2 = new BigDecimal(Double.toString(small3));
        return b1.subtract(b2).doubleValue();
    }
    public double getParity3(){
        BigDecimal b1 = new BigDecimal(Double.toString(odd3));
        BigDecimal b2 = new BigDecimal(Double.toString(even3));
        return b1.subtract(b2).doubleValue();
    }
}
